package com.example.samples;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import com.example.R;

/**
 * Created with IntelliJ IDEA.
 * User: Andrei
 * Date: 8/2/12
 * Time: 9:36 PM
 * To change this template use File | Settings | File Templates.
 */
public class ExampleTransitionUpDown extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.example_transition_up_down);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            finish();
            overridePendingTransition(0, R.anim.go_down);
        }
        return super.onKeyDown(keyCode, event);
    }
}